<?php

/**
 * ======================================================================
 * LICENSE: This file is subject to the terms and conditions defined in *
 * file 'license.txt', which is part of this source code package.       *
 * ======================================================================
 */
?>
<div class="wrap" id="aam">
    <div class="postbox-container" style="width:70%;">
        <div class="metabox-holder">
            <div class="meta-box-sortables">
                <div class="postbox">
                    <div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
                    <h3 class="hndle">
                        <span>
                            <?php echo __('Extension List', 'aam'); ?>
                        </span>
                    </h3>
                    <div class="inside">
                        <table id="extension_list">
                            <thead>
                                <tr>
                                    <th width="25%"><?php echo __('Name', 'aam'); ?></th>
                                    <th width="50%"><?php echo __('Description', 'aam'); ?></th>
                                    <th width="10%"><?php echo __('Price', 'aam'); ?></th>
                                    <th><?php echo __('Actions', 'aam'); ?></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        <span class="extension-name">AAM Plus Package</span>
                                    </td>
                                    <td class="extension-description">
                                        This Extension extends default AAM basic features and unlock some limitations.
                                        Add custom taxonomy <b>Page Category</b> to ground pages into categories;
                                        Unlock the limitation for Post Access control;
                                        Add additional Capability Group <b>Comments</b> with the set of capabilities to control default comment
                                        actions like <b>Reply</b>, <b>Mark Spam</b>, <b>Trash</b>, <b>Delete</b> etc;
                                        Add possibility to setup default post or page access.
                                        For more details, please visit our forum.
                                    </td>
                                    <td class="extension-price payed">$30.00</td>
                                    <td>
                                        <div class="extension-actions">
                                            <a href="http://wpaam.com/aam-extensions/aam-plus-package/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
                                            <?php if ($this->getRepository()->hasExtension('AAM Plus Package')) { ?>
                                                <a href="#" extension="AAM Plus Package" license="<?php echo $this->getRepository()->getExtension('AAM Plus Package')->license; ?>" class="extension-action extension-action-ok" aam-tooltip="Installed Successfully"></a>
                                            <?php } else { ?>
                                                <a href="#" extension="AAM Plus Package" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UEM8U65HFEG4Q" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
                                            <?php } ?>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span class="extension-name">AAM Activities</span>
                                    </td>
                                    <td class="extension-description">
                                        Extend the list of activities that AAM can track. By default AAM logs only user <i>login</i> and <i>logout</i>.
                                        By purchasing this extension you can also track activities like post trash, delete, update etc.
                                        As well as we can implement any additional activity on demand. Check <a href="http://wpaam.com/aam-extensions/aam-activities/" traget="_blank">our website</a> for more details.
                                    </td>
                                    <td class="extension-price payed">$20.00</td>
                                    <td>
                                        <div class="extension-actions">
                                            <a href="http://wpaam.com/aam-extensions/aam-activities/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
                                            <?php if ($this->getRepository()->hasExtension('AAM Activities')) { ?>
                                                <a href="#" extension="AAM Activities" license="<?php echo $this->getRepository()->getExtension('AAM Activities')->license; ?>" class="extension-action extension-action-ok" aam-tooltip="Installed Successfully"></a>
                                            <?php } else { ?>
                                                <a href="#" extension="AAM Activities" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HME9DTSFSJH4W" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
                                            <?php } ?>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span class="extension-name">AAM Media Manager</span>
                                    </td>
                                    <td class="extension-description">
                                        It is the first official prototype that allows you to group your media files in Categories.
                                        Visit our <a href="http://wpaam.com/aam-extensions/aam-media-manager/" target="_blank">website</a>
                                        to find out more about current functionality and future development plans.
                                    </td>
                                    <td class="extension-price payed">$10.00</td>
                                    <td>
                                        <div class="extension-actions">
                                            <a href="http://wpaam.com/aam-extensions/aam-media-manager/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
                                            <?php if ($this->getRepository()->hasExtension('AAM Media Manager')) { ?>
                                                <a href="#" extension="AAM Media Manager" license="<?php echo $this->getRepository()->getExtension('AAM Media Manager')->license; ?>" class="extension-action extension-action-ok" aam-tooltip="Installed Successfully"></a>
                                            <?php } else { ?>
                                                <a href="#" extension="AAM Media Manager" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WJ48A7Z6EFZJ4" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
                                            <?php } ?>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span class="extension-name">AAM Content Filter</span>
                                    </td>
                                    <td class="extension-description">
                                        The first version of AAM Content Filter Extension allows you to filter content for your Posts or Pages or Custom Post Types.
                                        The content (or part of the content) can be filtered based on currently logged in user or visitor.
                                        Check our <a href="http://wpaam.com/aam-extensions/aam-content-filter/" target="_blank">website</a> for more information.
                                    </td>
                                    <td class="extension-price payed">$15.00</td>
                                    <td>
                                        
                                        <div class="extension-actions">
                                            <a href="http://wpaam.com/aam-extensions/aam-content-filter/" target="_blank" class="extension-action extension-action-forum" aam-tooltip="Visit Our Website"></a>
                                            <?php if ($this->getRepository()->hasExtension('AAM Content Filter')) { ?>
                                                <a href="#" extension="AAM Content Filter" license="<?php echo $this->getRepository()->getExtension('AAM Content Filter')->license; ?>" class="extension-action extension-action-ok" aam-tooltip="Installed Successfully"></a>
                                            <?php } else { ?>
                                                <a href="#" extension="AAM Content Filter" link="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X7NZ7QF8A9CVS" class="extension-action extension-action-purchase" aam-tooltip="Get it Today"></a>
                                            <?php } ?>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <div id="install_extension" class="aam-dialog" title="<?php echo __('Install Extension', 'aam'); ?>">
                            <p class="dialog-content">
                                <?php echo __('If you already have license key for current extension, please enter it below. Othewise click <b>Purchase</b> button to checkout your order.', 'aam'); ?>
                                <input type="text" class="license-input" id="license_key" placeholder="License Key" />
                            </p>
                            <ul class="extension-error-list"></ul>
                        </div>
                        <div id="update_extension" class="aam-dialog" title="<?php echo __('Update Extension', 'aam'); ?>">
                            <p class="dialog-content" style="text-align: center;">
                                <?php echo __('Extension has been installed. Your license key: ', 'aam'); ?><br/>
                                <b><span id="installed_license_key"></span></b>
                            </p>
                            <ul class="extension-error-list"></ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php if (aam_Core_Console::hasIssues()) { ?>
        <div class="postbox-container" style="width:25%; margin-left: 2%;">
            <div class="metabox-holder">
                <div class="meta-box-sortables">
                    <div class="postbox">
                        <div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
                        <h3 class="hndle">
                            <span><?php echo __('AAM Warnings', 'aam'); ?></span>
                        </h3>
                        <div class="inside">
                            <?php foreach (aam_Core_Console::getWarnings() as $warning) { ?>
                                <div class="aam-warning"><span><?php echo $warning; ?></span></div>
                            <?php } ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php } ?>

    <div class="postbox-container" style="width:25%; margin-left: 2%;">
        <div class="metabox-holder">
            <div class="meta-box-sortables">
                <div class="postbox">
                    <div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
                    <h3 class="hndle">
                        <span><?php echo __('Connect with AAM', 'aam'); ?></span>
                    </h3>
                    <div class="inside">
                        <div class="large-icons-row">
                            <a href="https://twitter.com/wpaam" class="aam-icon aam-icon-large aam-icon-large-twitter" aam-tooltip="Follow @wpaam" target="_blank">
                                <span></span><?php echo __('Follow Us', 'aam'); ?>
                            </a>
                            <a href="mailto:support@wpaam.com" class="aam-icon aam-icon-large aam-icon-large-message" aam-tooltip="Send Us Email">
                                <span></span><?php echo __('Send Message', 'aam'); ?>
                            </a>
                            <a href="http://wpaam.com" class="aam-icon aam-icon-large aam-icon-large-link" aam-tooltip="Visit Us" target="_blank">
                                <span></span><?php echo __('Website', 'aam'); ?>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="postbox-container" style="width:25%; margin-left: 2%;">
        <div class="metabox-holder">
            <div class="meta-box-sortables">
                <div class="postbox">
                    <div class="handlediv" title="<?php echo __('Click to toggle', 'aam'); ?>"></div>
                    <h3 class="hndle">
                        <span><?php echo __('Development License', 'aam'); ?></span>
                    </h3>
                    <div class="inside">
                        <p>
                            <?php echo __('Become a member of <b>AAM Community</b>. Obtain <b>Development License</b> today for $119 and get access to all extensions that are available today and will be developed witin a year.', 'aam'); ?>
                        </p>
                        <div style="text-align: center;">
                            <a href="http://wpaam.com/aam-development/aam-development-license/" target="_blank" class="button button-primary button-large"><?php echo __('Read More', 'aam'); ?></a>
                            </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>